﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using DevLib.SuperTool;
using DevLib.FileTool;

/** 
 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **
 * Description: 
 * Author: Heller (HellerSong@outlook.com)
 * CreationTime: 4/3/2015 11:17:31 PM
 ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** 
 **/
namespace UnitTest.TestFileTool
{
	[TestClass]
	public class TestIniHelper
	{
		

		[TestMethod]
		public void test_read_key_value()
		{
			String iniFile = DirOM.CombinePath(DevGlobal.PATH_RESOURCE, "ConfigFiles", "Config.ini");
			Console.WriteLine(iniFile);
			Console.WriteLine(IniHelper.GetKeyValueBySection(iniFile, "WordPhone", "owner"));
		}

		[TestMethod]
		public void test_write_key_value()
		{
			String iniFile = DirOM.CombinePath(DevGlobal.PATH_RESOURCE, "ConfigFiles", "Config.ini");
			IniHelper.WriteKeyValueBySection(iniFile, "WordPad", "searchingPath", @"secnarios\Mac\Word");
			IniHelper.WriteKeyValueBySection(iniFile, "WordPad", "owner", "v-hesong");
		}
	}
}
